#include "window-create.h"

void
window_create_init()
{
	struct window_create_s *window;

	window = g_malloc(sizeof(struct window_create_s));


	window->label_name = gtk_label_new("Room name");
	gtk_misc_set_alignment(window->label_name, 0.0, 0.0);
	window->label_width = gtk_label_new("Width");
	gtk_misc_set_alignment(window->label_width, 0.0, 0.0);
	window->label_height = gtk_label_new("Height");
	gtk_misc_set_alignment(window->label_height, 0.0, 0.0);

	window->entry_name = gtk_entry_new();
	window->entry_width = gtk_entry_new();
	window->entry_height = gtk_entry_new();

	window->button_ok = gtk_button_new_from_stock(GTK_STOCK_OK);
	window->button_cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL);

	window->box_buttons = gtk_hbox_new(FALSE, 2);
	gtk_box_pack_start(window->box_buttons, window->button_ok, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_buttons, window->button_cancel, FALSE, FALSE, 2);

	window->box_main = gtk_vbox_new(FALSE, 2);
	gtk_box_pack_start(window->box_main, window->label_name, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_main, window->entry_name, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_main, window->label_width, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_main, window->entry_width, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_main, window->label_height, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_main, window->entry_height, FALSE, FALSE, 2);
	gtk_box_pack_start(window->box_main, window->box_buttons, FALSE, FALSE, 2);

	window->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_container_add(window->window, window->box_main);
	gtk_window_set_title(window->window, "Create room");
	gtk_container_set_border_width(window->window, 2);
	gtk_widget_show_all(window->window);
}

